package cn.yqx.bankshop.user.controller;

import cn.yqx.bankshop.user.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1/user-auth")
public class UserAuthController {
    @Autowired
    UserInfoService userInfoService ;

    @RequestMapping(value = "/username" ,method = RequestMethod.GET)
    public Object selectByUsername(String username){
        return userInfoService.selectByUsername(username) ;
    }
    @RequestMapping(value = "/login" ,method = RequestMethod.GET)
    public Object Login(String username){
        return userInfoService.selectByUsername(username) ;
    }

    @RequestMapping(value = "/mobile" ,method = RequestMethod.GET)
    public Object findByMobile(String mobile){
        return userInfoService.findByMobile(mobile) ;
    }

    @RequestMapping(value = "/openId" ,method = RequestMethod.GET)
    public Object findByOpenId(String openId){
        return userInfoService.findByOpenId(openId) ;
    }
}
